﻿namespace MefContrib.Models.Provider.Validation
{
    using System;

    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="T">The type of the argument which it going to be validated.</typeparam>
    public class Validator<T>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="Validator{T}"/> class,
        /// using the provided taget and name.
        /// </summary>
        /// <param name="value"></param>
        /// <param name="name"></param>
        public Validator(T value, string name)
        {
            this.Name = name;
            this.Value = value;
        }
        
        /// <summary>
        /// Gets or sets the name of the argument that is being validated.
        /// </summary>
        /// <value>A <see cref="String"/> containing the name of the argument.</value>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the value of the argument that is being validated.
        /// </summary>
        /// <value>An object of type specified by the <typeparam name="T"></typeparam> parameter.</value>
        public T Value { get; set; }
    }
}